import { login } from "@/api/login"
const state = {
  token: ""
}
const mutations = {
  setToken(state, data) {
    state.token = data
  }
}
const actions = {
  async loginFn(stort, data) {
    const res = await login(data)
    console.log(res);
    stort.commit("setToken", res.data.data)
  }
}

export default {
  namespaced: true,
  state,
  mutations,
  actions,
}